package adv4;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest5 {
    public static void main(String[] args) {
        FileOutputStream fout = null;
        try {
            //FileOutputStream fout=new FileOutputStream("d:/tmp/java86/花名册.txt");
            fout = new FileOutputStream("d:/tmp/java86/花名册.txt", true);
            fout.write('\r');
            fout.write('\n');
            fout.write(97);
            fout.write(66);
            fout.write(67);
            fout.write('f');
            fout.write(21016);//=>byte
            String str = "范德是是个big帅哥";
            fout.write(str.getBytes());
            fout.write("徐恩的是个小帅哥".getBytes());
            fout.flush();
            //fout.close();去掉
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (fout != null)
                    fout.close();
            } catch (Exception e) {

            }
        }
    }
}
